package com.ruoyi.common.enums;

/**
 * 用户类型枚举
 * @author lisongtao
 * @date 2023/10/21 21:44
 */
public enum UserTypeEnum {
    EMPLOYEE("00", "工作人员"), CONSUMER("11", "供热用户");

    private final String code;
    private final String info;

    UserTypeEnum(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static UserTypeEnum getUserTypeEnum(String code) {
        UserTypeEnum userTypeEnum = null;
        for (UserTypeEnum value : values()) {
            if (code.equals(value.getCode())) {
                userTypeEnum = value;
            }
        }
        return userTypeEnum;
    }

}
